Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] [FIX] membership_prorate: fix for calculating quantity for prorate products #173

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

ByteMeAsap
Copy link

@ByteMeAsap ByteMeAsap commented Sep 10, 2024

This PR tends to solve quantity calculations for prorate products.Consider the following scenario:
Define a membership product with fixed dates, set start date as 1st Feb 2024 and end date as 29th Feb 2024, then create an invoice ,set 1st Feb 2024 as start date and select the product and save.Ideally the qty should be set as 1, but its sets it as 0.97 without changes added in this PR.
Also, changes in test scripts were needed for prorate variable period as for a week, if we consider from Thursday, it would be 4 days including Thursday(Thursday,Friday,Saturday and Sunday) i.e 4/7 = approximately 57% and similarly for the month - its 16 days including 15th April so 16/30 =approximately 53%

…oducts

Changes in test script for prorate_variable_period
@ByteMeAsap ByteMeAsap changed the title [FIX] membership_prorate: fix for calculating quantity for prorate products [16.0] [FIX] membership_prorate: fix for calculating quantity for prorate products Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant